function EC_GSC(t){
    this.gsc_type=t,
        this.protocol="https:"===window.location.protocol?"https://":"http://",
        this.domain="sms.ecsage.net",
        this.getCodeUrl=this.protocol+this.domain+"/rest/api/esms/sendcode",
        this.verifyUrl=this.protocol+this.domain+"/rest/api/esms/verifyget",
        this.callKey="EC_SMS_CALL",this.msgtype="msg_01",
        this.pageDomain=document.domain}
        EC_GSC.prototype.getCode=function(mobile,callback){
            var murl=this.getCodeUrl+"?"+Math.random()+"&call="+this.callKey+"&msgtype="+this.msgtype+"&domain="+this.pageDomain+"&mobile="+mobile;
            // $.get(murl,function(data,status){
            // var msg=eval(data);
            // "0"===msg.errcode?"function"==typeof callback&&callback(0):"function"==typeof callback&&callback(1)
            // }
            // )
            $.ajax({
                url:"check_code",
                type:"POST",
                data:{"mobile":mobile, "type":1},
                success: function(data){
                    if(data.code == 200 ){

                    }
                },
                error: function(XMLHttpRequest, textStatus, errorThrown){
                    console.log(XMLHttpRequest);
                    alert("请求失败，请重新进行提交");
                }
            });


        },
        EC_GSC.prototype.verifyCode=function(mobile,code,callback){
            var url=this.verifyUrl+"?"+Math.random()+"&call="+this.callKey+"&msgtype="+this.msgtype+"&domain="+this.pageDomain+"&mobile="+mobile+"&code="+code;
            // $.get(url,function(data,status){
            //     var msg=eval(data);callback("0"===msg.errcode?0:1)})
            $.ajax({
                url:"vitify_code",
                type:"POST",
                data:{"mobile":mobile, "check_code":code},
                success: function(data){
                    if(data.code == 200 ){
                        callback(0);
                    }else {
                        alert("验证码输入错误！");
                    }
                },
                error: function(XMLHttpRequest, textStatus, errorThrown){
                    console.log(XMLHttpRequest);
                    callback(1)
                }
            });
        };